import style from '.module.less'
import { sendCmd } from '@/agora/rtm'
import { defineComponent } from 'vue'
import { useRoute } from 'vue-router'

export default defineComponent({
    setup: () => {
        const r = useRoute()
        const imgSrc = Object.keys(r.query)[0]
        console.log('收到的参数', imgSrc)

        const toUse = () => {
            sendCmd('finish')
            window.close()
        }
        return () => <div class={style.root}>
            <div class="title">生成成功</div>
            <img class='img' src={imgSrc} />
            <div class='btn' onClick={toUse}>去使用</div>
        </div>
    }
})